package cn.itcast.nems.studentrecord.dao.entity;

import cn.itcast.nems.common.entity.UUIDEntity;
import cn.itcast.nems.employee.dao.bean.EmployeeGroupBean;
import cn.itcast.nems.studentrecord.dao.condition.ApprovalType;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;

/**
 * <p>
 * 学费转移凭单
 * </p>
 * @author 陈早庆
 * @since 2024-02-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("e2_journal_fund_transfer")
public class JournalFundTransfer extends UUIDEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 业务实际办理日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime bizDate;

    /**
     * 转出学籍ID
     */
    private String originStudentRecordId;
    private String targetStudentRecordId;

    /**
     * 转出班级ID
     */
    private Integer originClazzId;

    /**
     * 转出班级名称
     */
    private String originClazzName;

    /**
     * 最大可转移金额
     */
    private String maxTransferAmount;

    /**
     * 本次转移金额
     */
    private String transferAmount;
    /**
     * 目标班级ID
     */
    private Integer targetClazzId;

    /**
     * 目标班级名称
     */
    private String targetClazzName;

    /**
     * 目标班级所属学科ID
     */
    private String targetClazzSubjectId;

    /**
     * 目标班级所属学科名称
     */
    private String targetClazzSubjectName;

    /**
     * 目标班级所在校区ID
     */
    private String targetClazzCampusId;

    /**
     * 目标班级所在校区名称
     */
    private String targetClazzCampusName;

    /**
     * 原实际支付金额=已付金额+转班转入金额
     */
    private String targetActualPaidAmount;

    /**
     * 新实际支付金额=已付金额+转班转入金额+本次费用转移金额
     */
    private String targetNewActualPaidAmount;

    /**
     * 校区ID
     */
    private String campusId;

    /**
     * 校区名字
     */
    private String campusName;
    /**
     * 渠道code
     */
    private String channelCode;
    /**
     * 渠道名称
     */
    private String channelName;
    /**
     * 渠道类型：{SINGLE_CHANNEL：单个原渠道，MORE_CHANNEL：多个原渠道}
     */
    private String channelType;

    /**
     * 校区ID
     */
    private String originCampusId;

    /**
     * 校区名字
     */
    private String originCampusName;
    /**
     * 渠道code
     */
    private String originChannelCode;
    /**
     * 渠道名称
     */
    private String originChannelName;
    /**
     * 原因；使用字典项ID或CODE
     */
    private String reasonCode;

    /**
     * 原因说明；使用字典项中文说明
     */
    private String reasonDescription;

    /**
     * 审批类型：{DRAFT：草稿，PENDING：待审批，APPROVING：审批中，REJECTED：审批未通过，FINISHED：已完成}
     */
    private String state;

    /**
     * 特殊申请：{0：非特殊，1：特殊}
     */
    private Boolean specialFlag;

    /**
     * 备注
     */
    private String remark;

    /**
     * ApprovalType：MY_COMMIT:我提交的、WAIT_APPROVAL:待我审核的、ALL：全部
     */
    @TableField(exist = false)
    private ApprovalType approvalType;
    @TableField(exist = false)
    private List<EmployeeGroupBean> employeeGroups;
    @TableField(exist = false)
    private List<String> formIds;
    @TableField(exist = false)
    private String flowCreatedBy;
    @TableField(exist = false)
    private String journalType;
    @TableField(exist = false)
    private String excludeState;
    /**
     * 学员ID
     */
    @TableField(exist = false)
    private Integer studentId;
    @TableField(exist = false)
    private String studentName;
    @TableField(exist = false)
    private String studentNo;
    @TableField(exist = false)
    private String createdName;
    @TableField(exist = false)
    private String createdByName;
    @TableField(exist = false)
    private String formId;
    /**
     * category：1：审批）2：知会）
     */
    @TableField(exist = false)
    private Integer category;
    /**
     * 创建时间-开始时间
     */
    @TableField(exist = false)
    private String createdStartTime;
    /**
     * 创建时间-结束时间
     */
    @TableField(exist = false)
    private String createdEndTime;

}
